﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Security;
using MvcEngine.Core.Helpers;

namespace MvcEngine.Blog.Components.Avatars
{
    public class GravatarProvider : IAvatarProvider
    {
        #region IAvatarProvider Members

        public string GetUrl(string email)
        {
            string hash = FormsAuthenticationHelper.Current.HashValue(email, "MD5").ToLowerInvariant();
            return "http://www.gravatar.com/avatar/" + hash + ".jpg?s=60&d=wavatar";
        }

        #endregion
    }
}
